//package com.plian.system.controller.fr.evaluation;
//
//
//import com.plian.Tools.FileTools;
//import com.plian.Tools.Func;
//import com.plian.Tools.StringPool;
//import com.plian.Tools.pagedata.PageData;
//import com.plian.system.entity.fr.evaluation.AssetEvaluationApproval;
//import com.plian.system.model.ListResult;
//import com.plian.system.model.R;
//import com.plian.system.model.token.PassToken;
//import com.plian.system.mybatis.support.Query;
//import com.plian.system.service.fr.evaluation.IAssetEvaluationApprovalService;
//import com.plian.system.vo.fr.evaluation.AssetEvaluationApprovalVO;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import lombok.RequiredArgsConstructor;
//import org.apache.commons.lang3.StringUtils;
//import org.springframework.core.io.FileSystemResource;
//import org.springframework.http.ResponseEntity;
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.List;
//
///**
// * <p>
// * 资产评估报告核准 前端控制器
// * </p>
// *
// * @author hu song
// * @since 2023-03-29 14:31:06
// */
//@RestController
//@RequestMapping("/api/assetEvaluationApproval")
//@RequiredArgsConstructor
//@Api(tags = "资产评估报告核准控制器")
//public class AssetEvaluationApprovalController {
//
//    private final IAssetEvaluationApprovalService assetEvaluationApprovalService;
//
//    @ApiOperation("分页查询")
//    @PostMapping("/list")
//    public ListResult<AssetEvaluationApprovalVO> list(@RequestBody Query query) {
//        return assetEvaluationApprovalService.findAll(query);
//    }
//
//    @ApiOperation("详情")
//    @PostMapping("/detail")
//    public R<AssetEvaluationApprovalVO> detail(@RequestBody AssetEvaluationApproval assetEvaluationApproval) {
//        return R.data(assetEvaluationApprovalService.detail(assetEvaluationApproval));
//    }
//
//    @ApiOperation(value = "新增或修改")
//    @PostMapping("/submit")
//    public R submit(@Validated @RequestBody AssetEvaluationApproval assetEvaluationApproval) {
//        return assetEvaluationApprovalService.saveOrUpdate(assetEvaluationApproval) ? R.data(assetEvaluationApproval) : R.fail();
//    }
//
//    @ApiOperation(value = "批量删除")
//    @PostMapping("/remove")
//    public R remove(@RequestBody PageData pd) {
//        List<String> ids = (List<String>) pd.get("ids");
//        return assetEvaluationApprovalService.deleteLogic(Func.toLongList(StringUtils.join(ids, StringPool.COMMA))) ? R.success() : R.fail();
//    }
//
//    @ApiOperation(value = "保存审核信息")
//    @PostMapping("/saveAuditInfo")
//    public R addAuditInfo(@RequestBody AssetEvaluationApproval assetEvaluationApproval) {
//        return assetEvaluationApprovalService.saveAuditInfo(assetEvaluationApproval) ? R.success() : R.fail();
//    }
//
//    @PostMapping("/exportPdf")
//    @PassToken
//    @ApiOperation(value = "导出pdf")
//    public ResponseEntity<FileSystemResource> exportPdf(@RequestBody AssetEvaluationApproval assetEvaluationApproval) {
//        return FileTools.exportPdf(assetEvaluationApprovalService.exportPdf(assetEvaluationApproval));
//    }
//
//    @ApiOperation(value = "添加质量评价")
//    @PostMapping("/addQualityEvaluation")
//    public R addQualityEvaluation(@RequestBody AssetEvaluationApproval assetEvaluationApproval) {
//        return assetEvaluationApprovalService.addQualityEvaluation(assetEvaluationApproval) ? R.success() : R.fail();
//    }
//
//    @ApiOperation(value = "通过查看质量评价")
//    @PostMapping("/getQualityEvaluationById/{id}")
//    public R addQualityEvaluation(@PathVariable Long id) {
//        return R.data(assetEvaluationApprovalService.getQualityEvaluationById(id));
//    }
//
//    @PostMapping("/exportQualityPdf")
//    @PassToken
//    @ApiOperation(value = "导出质量评价pdf")
//    public ResponseEntity<FileSystemResource> exportQualityPdf(@RequestBody AssetEvaluationApproval assetEvaluationApproval) {
//        return FileTools.exportPdf(assetEvaluationApprovalService.exportQualityPdf(assetEvaluationApproval));
//    }
//}
//
